home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
cool
/
ge_cool.lha
/
GE_COOL2.1
/
man
/
oldman3
/
Timer.3T
< prev
next >
Wrap
Text File
|
1992-06-26
|
3KB
|
83 lines
.TH TIMER
.SH NAME
Timer A timing facility for C++
.SH SYNOPSIS
#include <cool/Timer.h>
.SH DESCRIPTION
The
Timer
class is publicly derived from the
class and provides an
interface to system timing. It allows a
C++
program to record the time between
a reference point (mark) and now. This class uses the system
time(2)
interface
to provide time resolution at either millisecond or microsecond granularity,
depending upon operating system support and features. Since the time duration
is stored in a 32-bit word, the maximum time period before rollover occurs is
about 71 minutes.
.PP
Due to operating system dependencies, the accuracy of all member function
results may not be as documented. For example, some operating systems do not
support timers with microsecond resolution. In those cases, the values returned
are provided to the nearest millisecond or other unit of time as appropriate.
See the Timer header file for system-specific notes.
.SH Base Classes
.SH Friend Classes
None
.SH Constructors
.TP
Timer ();
Creates an instance of the
Timer
class with the mark set to creation time.
.SH Member Functions
.TP
long all();
Returns the number of milliseconds spent in the user process and the operating
system since the last reference point (mark).
.TP
long all_usec();
Returns the number of microseconds spent in the user process and the operating
system since the last reference point (mark).
.TP
void mark ();
Sets the reference time to now.
.TP
long real();
Returns the number of milliseconds of wall clock time since the last reference
point (mark).
.TP
long system();
Returns the number of milliseconds spent in the operating system since the last
reference point (mark).
.TP
long system_usec();
Returns the number of microseconds spent in the operating system since the last
reference point (mark).
.TP
long user();
Returns the number of milliseconds spent in the user process since the last
reference point (mark).
.TP
long user_usec();
Returns the number of microseconds spent in the user process since the last
reference point (mark).
.SH COPYRIGHT
Copyright (C) 1991 Texas Instruments Incorporated.
Permission is granted to any individual or institution to use, copy, modify,
and distribute this software, provided that this complete copyright and
permission notice is maintained, intact, in all copies and supporting
documentation.
Texas Instruments Incorporated provides this software "as is" without
express or implied warranty.